<gm:page title="Sample - Inline Data" onload="load();" authenticate="false">

  <!--
    The Inline Data  application demonstrates how to create a new feed inline
    using the gm:data tag. Using gm:data, you can create a feed customized for
    your needs and then assign this feed as the source of a gm:list, gm:map,
    or any other GME component as other examples demonstrate.

    This sample renders the titles of two inline feed entries in a list, and
    includes a gm:toggle control next to each that, when clicked, displays the
    entry's description directly underneath.
    @author: GME Team
  -->

  <div class="gm-app-header">
    <h1>Inline Data</h1>
  </div>

  <gm:data id="stringData_pt">
    <atom:feed>
      <atom:entry>
        <atom:id>1</atom:id>
        <atom:title>Entry Title 1</atom:title>
        <atom:content>This is sample content for entry 1.</atom:content>
      </atom:entry>
    </atom:feed>
  </gm:data>

  <gm:item id="myItem" data="${myData}" template="myListTemplate"/>
  
  <gm:item id="myItem2" data="${myData}" template="myListTemplate"/>
  
  <gm:template id="myListTemplate">
    <table class="gm-table" style="width:250px">
      <thead>
        <tr>
          <td style="width:40px"></td>
          <td>Title</td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><gm:toggle/></td>
          <td><gm:text ref="atom:title"/></td>
        </tr>
        <tr class="gm-toggled">
          <td></td>
          <td><gm:text ref="atom:content"/></td>
        </tr>
      </tbody>
    </table>
  </gm:template>
  
  <script>
    function load(){
     var static = google.mashups.getObjectById("myData").entryAt(0);
     var item = google.mashups.getObjectById("myItem").setEntry(entry);    
    }
  </script>

</gm:page>